﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

namespace GamePrep
{
    public class GameField
    {
        private int height;
        private int width;
        private int x;
        private int y;


        public int X
        {
            get
            {
                return x;
            }
            private set
            {
                if (value <= 0)
                    throw new ArgumentOutOfRangeException("Wrong start X-axis!");
                x = value;
            }
        }
        public int Y
        {
            get
            {
                return y;
            }
            private set
            {
                if (value <= 0)
                    throw new ArgumentOutOfRangeException("Wrong start Y-axis!");
                y = value;
            }
        }
        public int Width
        {
            get
            {
                return width;
            }
            private set
            {
                if (value <= 0)
                    throw new ArgumentOutOfRangeException("Wrong width!");
                width = value;
            }
        }
        public int Height
        {
            get
            {
                return height;
            }
            private set
            {
                if (value <= 0)
                    throw new ArgumentOutOfRangeException("Wrong height!");
                height = value;
            }
        }

        public GameField(int x, int y, int width, int height)
        {
            X = x;
            Y = y;
            Height = height;
            Width = width;
        }
    }
}
